using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace SystemFunctionLib.Apis
{
    internal partial class WinApis
    {
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(ref byte structure, uint ptr, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(ref MIXERCONTROL structure, uint ptr, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(ref MIXERCONTROLDETAILS_LISTTEXT structure, uint ptr, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(ref MIXERCONTROLDETAILS_UNSIGNED structure, uint ptr, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(ref MIXERCONTROLDETAILS_SIGNED structure, uint ptr, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(ref MIXERCONTROLDETAILS_BOOLEAN structure, uint ptr, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(uint ptr, ref MIXERCONTROLDETAILS_LISTTEXT structure, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(uint ptr, ref MIXERCONTROLDETAILS_UNSIGNED structure, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(uint ptr, ref MIXERCONTROLDETAILS_SIGNED structure, uint cb);
        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern void RtlMoveMemory(uint ptr, ref MIXERCONTROLDETAILS_BOOLEAN structure, uint cb);

        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern uint GlobalAlloc(uint wFlags, uint dwBytes);

        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern uint GlobalLock(uint hmem);

        [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
        public static extern uint GlobalFree(uint hmem);

        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern bool SetSystemTimeAdjustment(
            uint dwTimeAdjustment,
            bool bTimeAdjustmentDisabled);

        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern bool SetSystemTime(
            [In] ref SYSTEMTIME time);

        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern bool SetLocalTime(
            [In] ref SYSTEMTIME lpLocalTime);

        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern TimeZoneResult GetTimeZoneInformation(
            out TIME_ZONE_INFORMATION lpTimeZoneInformation);
    }
}
